package com.fr.base.core.antlr;

class Alternative
{
  AlternativeElement head;
  AlternativeElement tail;
  protected SynPredBlock synPred;
  protected String semPred;
  protected ExceptionSpec exceptionSpec;
  protected Lookahead[] cache;
  protected int lookaheadDepth;
  protected Token treeSpecifier = null;
  private boolean doAutoGen;

  public Alternative()
  {
  }

  public Alternative(AlternativeElement paramAlternativeElement)
  {
    addElement(paramAlternativeElement);
  }

  public void addElement(AlternativeElement paramAlternativeElement)
  {
    if (this.head == null)
    {
      this.head = (this.tail = paramAlternativeElement);
    }
    else
    {
      this.tail.next = paramAlternativeElement;
      this.tail = paramAlternativeElement;
    }
  }

  public boolean atStart()
  {
    return (this.head == null);
  }

  public boolean getAutoGen()
  {
    return ((this.doAutoGen) && (this.treeSpecifier == null));
  }

  public Token getTreeSpecifier()
  {
    return this.treeSpecifier;
  }

  public void setAutoGen(boolean paramBoolean)
  {
    this.doAutoGen = paramBoolean;
  }
}